@use "sass:color";

// Converted rc-slider/assets/index.css to .less

// TODO name colors properly
$color_1: $gray-600;
$color_2: $gray-700;
$slider_base_color: $gray-600;
$background_color_2: $blue-200;
$background_color_4: $gray-400;
$background_color_5: $gray-700;
$border_color_1: $orange;
$border_color_2: $orange;
$border_color_3: $blue-400;
$border_color_4: $gray-400;
$border_color_5: transparent;
$border_top_color_1: $gray-700;

@keyframes rcSliderTooltipZoomDownIn {
  0% {
    transform: scale(0, 0);
    transform-origin: 50% 100%;
    opacity: 0;
  }
  100% {
    transform: scale(1, 1);
    transform-origin: 50% 100%;
  }
}
@keyframes rcSliderTooltipZoomDownOut {
  0% {
    transform: scale(1, 1);
    transform-origin: 50% 100%;
  }
  100% {
    transform: scale(0, 0);
    transform-origin: 50% 100%;
    opacity: 0;
  }
}
.rc-slider {
  position: relative;
  width: 100%;
  height: 14px;
  padding: 5px 0;
  border-radius: 6px;
  touch-action: none;
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  * {
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  }
}
.rc-slider-rail {
  position: absolute;
  width: 100%;
  height: 6px;
  background-color: $slider_base_color;
  border-radius: 6px;
}
.rc-slider-track {
  position: absolute;
  height: 6px;
  background-color: $background_color_2;
  border-radius: 6px;
}
.rc-slider-handle {
  position: absolute;
  width: 3rem;
  height: 3rem;
  margin-top: -12px;
  background-color: $purple;
  border-radius: 50%;
  cursor: pointer;
  cursor: -webkit-grab;
  cursor: grab;
  touch-action: pan-x;
  transition: all 0.5s cubic-bezier(0.46, 0.03, 0.52, 0.96) 0s;
  &:focus {
    outline: none;
    box-shadow: none;
  }
  &:focus-visible {
    border-color: color.adjust($purple, $lightness: 10%);
    box-shadow: 0 0 3px $purple;
  }
  &:active {
    border-color: $purple;
    cursor: -webkit-grabbing;
    cursor: grabbing;
  }
}
.rc-slider-handle-dragging.rc-slider-handle-dragging.rc-slider-handle-dragging {
  background-color: $purple;
  border-color: color.adjust($purple, $lightness: 10%);
  box-shadow: 0 0 7px $purple;
}
.rc-slider-handle-click-focused {
  &:focus {
    border-color: $orange;
    box-shadow: unset;
  }
}
.rc-slider-mark {
  position: absolute;
  top: 18px;
  left: 0;
  width: 100%;
  font-size: 12px;
}
.rc-slider-mark-text {
  position: absolute;
  display: inline-block;
  color: $slider_base_color;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  &:hover {
    color: color.adjust($blue, $lightness: 10%);
    font-weight: 700;
  }
}
.rc-slider-mark-text-active {
  color: $color_2;
}
.rc-slider-step {
  position: absolute;
  width: 100%;
  height: 4px;
  background: transparent;
  pointer-events: none;
}
.rc-slider-dot {
  visibility: hidden;
  position: absolute;
  bottom: -2px;
  width: 8px;
  height: 8px;
  vertical-align: middle;
  background-color: $white;
  border: 2px solid $gray-200;
  border-radius: 50%;
  cursor: pointer;
}
.rc-slider-dot-active {
  border-color: $border_color_3;
}
.rc-slider-dot-reverse {
  margin-right: -4px;
}
.rc-slider-disabled {
  background-color: $slider_base_color;
  .rc-slider-track {
    background-color: $background_color_4;
  }
  .rc-slider-handle {
    background-color: $white;
    border-color: $border_color_4;
    box-shadow: none;
    cursor: not-allowed;
  }
  .rc-slider-dot {
    background-color: $white;
    border-color: $border_color_4;
    box-shadow: none;
    cursor: not-allowed !important;
  }
  .rc-slider-mark-text {
    cursor: not-allowed !important;
  }
}
.rc-slider.slider-horizontal .rc-slider-mark-text {
  transform: translateY(4px) rotateZ(45deg) !important;
}
.rc-slider-vertical {
  width: 5rem;
  height: 100%;
  padding: 0 5px;
  margin: 1rem 0 1rem 1rem;

  .rc-slider-rail {
    width: 0.7rem;
    height: 100%;
  }
  .rc-slider-track {
    bottom: 0;
    left: 5px;
    width: 4px;
  }
  .rc-slider-handle {
    width: 3rem;
    height: 3rem;
    margin-top: 0;
    margin-left: -12px;
    touch-action: pan-y;
    z-index: 1;
    transition: all 0.5s cubic-bezier(0.46, 0.03, 0.52, 0.96) 0s;
  }
  .rc-slider-mark {
    top: 0;
    left: 18px;
    height: 100%;
  }
  .rc-slider-step {
    width: 4px;
    height: 100%;
  }
  .rc-slider-dot {
    margin-left: -2px;
  }
}
.rc-slider-tooltip-zoom-down-enter {
  display: block !important;
  animation-duration: 0.3s;
  animation-fill-mode: both;
  animation-play-state: paused;
  transform: scale(0, 0);
  animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
}
.rc-slider-tooltip-zoom-down-appear {
  display: block !important;
  animation-duration: 0.3s;
  animation-fill-mode: both;
  animation-play-state: paused;
  transform: scale(0, 0);
  animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
}
.rc-slider-tooltip-zoom-down-leave {
  display: block !important;
  animation-duration: 0.3s;
  animation-fill-mode: both;
  animation-play-state: paused;
  animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
}
.rc-slider-tooltip-zoom-down-enter.rc-slider-tooltip-zoom-down-enter-active {
  animation-name: rcSliderTooltipZoomDownIn;
  animation-play-state: running;
}
.rc-slider-tooltip-zoom-down-appear.rc-slider-tooltip-zoom-down-appear-active {
  animation-name: rcSliderTooltipZoomDownIn;
  animation-play-state: running;
}
.rc-slider-tooltip-zoom-down-leave.rc-slider-tooltip-zoom-down-leave-active {
  animation-name: rcSliderTooltipZoomDownOut;
  animation-play-state: running;
}
.rc-slider-tooltip {
  position: absolute;
  top: -9999px;
  left: -9999px;
  visibility: visible;
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  * {
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  }
}
.rc-slider-tooltip-hidden {
  display: none;
}
.rc-slider-tooltip-placement-top {
  padding: 4px 0 8px 0;
  .rc-slider-tooltip-arrow {
    bottom: 4px;
    left: 50%;
    margin-left: -4px;
    border-width: 4px 4px 0;
    border-top-color: $border_top_color_1;
  }
}
.rc-slider-tooltip-inner {
  min-width: 24px;
  height: 24px;
  padding: 6px 2px;
  color: $white;
  font-size: 12px;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  background-color: $background_color_5;
  border-radius: 6px;
  box-shadow: 0 0 4px $gray-300;
}
.rc-slider-tooltip-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-color: $border_color_5;
  border-style: solid;
}
